// pages/mine/mine.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    isLogin: false,
    id:0,
    user:{}

  },
  tuichu() {
    wx.setStorageSync('isLogin', false);
    this.setData({
      isLogin: false
    })
  },
  top_login() {
    wx.navigateTo({
      url: '../minedetail/login/login',
      success: (result) => { console.log("跳转登录成功") },
      fail: (res) => {
        console.log("跳转登录失败")
        console.log(res)
      },
      complete: (res) => { },
    })
  }, about() {
    wx.navigateTo({
      url: '../minedetail/about/about',
      success: (result) => { console.log("跳转关于成功") },
      fail: (res) => {
        console.log("跳转关于失败")
        console.log(res)
      },
      complete: (res) => { },
    })
  }, coursecollection() {
    wx.navigateTo({
      url: '../minedetail/coursecollection/coursecollection',
      success: (result) => { console.log("跳转课程收藏成功") },
      fail: (res) => {
        console.log("跳转课程收藏失败")
        console.log(res)
      },
      complete: (res) => { },
    })
  }, ceping() {
    wx.navigateTo({
      url: '../minedetail/ceping/ceping',
      success: (result) => { console.log("跳转课程收藏成功") },
      fail: (res) => {
        console.log("跳转课程收藏失败")
        console.log(res)
      },
      complete: (res) => { },
    })
  },
  zixun() {
    wx.navigateTo({
      url: '../minedetail/zixun/zixun',
      success: (result) => { console.log("跳转课程收藏成功") },
      fail: (res) => {
        console.log("跳转课程收藏失败")
        console.log(res)
      },
      complete: (res) => { },
    })
  },
  tongzhi() {
    wx.navigateTo({
      url: '../minedetail/tongzhi/tongzhi?id=',
      success: (result) => { console.log("跳转课程收藏成功") },
      fail: (res) => {
        console.log("跳转课程收藏失败")
        console.log(res)
      },
      complete: (res) => { },
    })
  }, mima() {
    wx.navigateTo({
      url: '../minedetail/login/mima/mima',
      success: (result) => { console.log("跳转课程收藏成功") },
      fail: (res) => {
        console.log("跳转课程收藏失败")
        console.log(res)
      },
      complete: (res) => { },
    })
  },huida() {
    wx.navigateTo({
      url: '../minedetail/huida/huida',
      success: (result) => { console.log("跳转课程收藏成功") },
      fail: (res) => {
        console.log("跳转课程收藏失败")
        console.log(res)
      },
      complete: (res) => { },
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    console.log("options" +wx.getStorageSync('isLogin'))
    const id = options.id
    console.log(id)
    this.setData({
      isLogin: wx.getStorageSync('isLogin')
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
    console.log( "onShow"+wx.getStorageSync('isLogin'))
    this.setData({
      isLogin: wx.getStorageSync('isLogin')
    })
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})